<?php
/* @var $this TransferController */
/* @var $dataProvider CActiveDataProvider */

$this->breadcrumbs=array(
	'部门调动',
	'收件箱'=>array('transfer/inbox'),
);

$this->menu=array(
	array('label'=>'Create Transfer', 'url'=>array('create')),
	array('label'=>'Manage Transfer', 'url'=>array('admin')),
);
?>
<span class="page_h3">收件箱</span>
<?php

$this->widget('zii.widgets.grid.CGridView', array(
    'id'=>'user-grid',
    'dataProvider'=>$dataProvider,
	'summaryText'=>'<font color=#0066A4>显示{start}-{end}条.共{count}条记录,当前第{page}页</font>',
    //'filter'=>$model,
	'columns'=>array( 
		array(
			'name'=>'id',
			'sortable' => true,
		),
		array(
			'name'=>'transfer_c_usernames',
			'htmlOptions'=>array(
                'width'=>'200',
                'style'=>'text-align:center',
             ), 
		),
		'from_department_name',
		'to_department_name',
		array(
			'name' => 'status',
			'value'=> 'Transfer::getStatusName($data->status)',
		),
		array(            // display 'create_time' using an expression
            'name'=>'effective_time',
            'value'=>'date("Y-m-d", $data->effective_time)',
        ),
		'start_c_username',
		
		array(        
            'class'=>'CButtonColumn',
			'template'=>'{audit}',
			'buttons'=>array(
                    'audit' => array(
                            'label'=>'审核',   
                            'url'=>'Yii::app()->controller->createUrl("transferAudit/index",array("id"=>$data->primaryKey))',  
                            'imageUrl'=>Yii::app()->request->baseUrl.'/global/img/icons/page_white_edit.png', 
                            'options'=>array('style'=>'cursor:pointer;'), 
                            //'visible'=>'Transfer::model()->auditCheck($data,Yii::app()->session["userInfo"]["unique_id"])',
                    ),
					/*
					 'edit' => array(
                            'label'=>'编辑',
                            'url'=>'Yii::app()->controller->createUrl("transfer/edit",array("id"=>$data->primaryKey))',   
                            'imageUrl'=>Yii::app()->request->baseUrl.'/global/img/icons/page_white_edit.png',  
                            'options'=>array('style'=>'cursor:pointer;'), 
                            'visible'=>'Transfer::model()->editCheck($data,Yii::app()->session["userInfo"]["unique_id"])',
                    ),
					*/
            ),
        ),
	), 
	'htmlOptions'=>array(
		'style'=>'text-align:center',
	),
		
));
?>